When declaring buffer blocks in GLSL, the name declared in the GLSL source
might not be the same as the name declared in the SPIR-V module due to naming conflicts.
In this case, SPIRV-Cross needs to find a fallback-name, and it might only
be possible to know this name after compiling to GLSL.
This is particularly important for HLSL input and UAVs which tends to reuse the same block type
for multiple distinct blocks. For these cases it is not possible to modify the name of the type itself
because it might be unique. Instead, you can use this interface to check after compilation which
name was actually used if your input SPIR-V tends to have this problem.
For other names like remapped names for variables, etc, it's generally enough to query the name of the variables
after compiling, block names are an exception to this rule.
ID is the name of a variable as returned by Resource::id, and must be a variable with a Block-like type.
When declaring buffer blocks in GLSL, the name declared in the GLSL source might not be the same as the name declared in the SPIR-V module due to naming conflicts. In this case, SPIRV-Cross needs to find a fallback-name, and it might only be possible to know this name after compiling to GLSL. This is particularly important for HLSL input and UAVs which tends to reuse the same block type for multiple distinct blocks. For these cases it is not possible to modify the name of the type itself because it might be unique. Instead, you can use this interface to check after compilation which name was actually used if your input SPIR-V tends to have this problem. For other names like remapped names for variables, etc, it's generally enough to query the name of the variables after compiling, block names are an exception to this rule. ID is the name of a variable as returned by Resource::id, and must be a variable with a Block-like type.
This also applies to HLSL cbuffers.